-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: controller: Refactor ll c into states/roles files #15
Bluetooth: controller: Refactor ll c into states/roles files #15
Conversation
fd12640
to
8c78e32
Compare
8c78e32
to
caad338
Compare
@jhedberg @carlescufi @Vudentz Please do the needful! |
caad338
to
19c80cb
Compare
The current implementation of stm32_gpio_set() uses the GPIO output data register to change the state of individual GPIOs. The generated assembler needs at least 3 instructions: load / modify / store. This opens a small race window, for example if a thread and an interrupt both try to change the state of the same GPIO bank. Use the GPIO bit set/reset register to perform the atomic change without locking. This also has the benefit of a more optimised implementation, which can be useful for GPIO-intensive work. Compare the new version: 08000c98 <stm32_gpio_set>: 8000c98: f001 010f and.w r1, r1, zephyrproject-rtos#15 8000c9c: 2301 movs r3, zephyrproject-rtos#1 8000c9e: b902 cbnz r2, 8000ca2 <stm32_gpio_set+0xa> 8000ca0: 3110 adds r1, zephyrproject-rtos#16 8000ca2: 408b lsls r3, r1 8000ca4: 6183 str r3, [r0, zephyrproject-rtos#24] 8000ca6: 2000 movs r0, #0 8000ca8: 4770 bx lr and the old one: 08000c98 <stm32_gpio_set>: 8000c98: 2301 movs r3, zephyrproject-rtos#1 8000c9a: f001 010f and.w r1, r1, zephyrproject-rtos#15 8000c9e: fa03 f101 lsl.w r1, r3, r1 8000ca2: 6943 ldr r3, [r0, zephyrproject-rtos#20] 8000ca4: b10a cbz r2, 8000caa <stm32_gpio_set+0x12> 8000ca6: 4319 orrs r1, r3 8000ca8: e001 b.n 8000cae <stm32_gpio_set+0x16> 8000caa: ea23 0101 bic.w r1, r3, r1 8000cae: 6141 str r1, [r0, zephyrproject-rtos#20] 8000cb0: 2000 movs r0, #0 8000cb2: 4770 bx lr Change-Id: Ie5800d1c345016028d1b9a099f5d74cac35f592a Signed-off-by: Florian Vaussard <[email protected]>
19c80cb
to
8ff2b85
Compare
case BT_OCF(BT_HCI_OP_LE_CONN_UPDATE): | ||
le_conn_update(cmd, evt); | ||
break; | ||
|
||
#if defined(CONFIG_BLUETOOTH_CONTROLLER_ROLE_MASTER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try to reorder the case statments so that each #if-#endif pair only appears once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
Lets see if this comment is lost!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No this review/comment is not lost when doing git push -f.
aac5133
to
776a426
Compare
In preparation for refactoring the Controller implementation into seperate state and role based source files, add Kconfig options for states and roles in the Controller. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Move advertising state related implementation out into a separate ll_adv.c file. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Move scanning state related implementation out into a separate ll_scan.c file. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Move master role related implementation out into a separate ll_master.c file. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Conditionally compile slave role related HCI commands. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Conditionally compile connection state related HCI commands. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
776a426
to
1433b32
Compare
[AIO] Fixed incorrect comments in in AIO sample js
* Modified SoC init function configures COP WDT to time out after 8192ms if CONFIG_WATCHDOG is set. * A demo application shows how the WDT must be reloaded in order not to time out. * Closes zephyrproject-rtos#15
feat: WDT: added WDT demo application Closes zephyrproject-rtos#15 See merge request blik/embedded/zephyr!25
Set of latest patches
This makes the gatt metrics also available for gatt write-without-rsp-cb so it now prints the rate of each write: uart:~$ gatt write-without-response-cb 1e ff 10 10 Write zephyrproject-rtos#1: 16 bytes (0 bps) Write zephyrproject-rtos#2: 32 bytes (3445948416 bps) Write zephyrproject-rtos#3: 48 bytes (2596929536 bps) Write zephyrproject-rtos#4: 64 bytes (6400 bps) Write zephyrproject-rtos#5: 80 bytes (8533 bps) Write zephyrproject-rtos#6: 96 bytes (10666 bps) Write zephyrproject-rtos#7: 112 bytes (8533 bps) Write zephyrproject-rtos#8: 128 bytes (9955 bps) Write zephyrproject-rtos#9: 144 bytes (11377 bps) Write zephyrproject-rtos#10: 160 bytes (7680 bps) Write zephyrproject-rtos#11: 176 bytes (8533 bps) Write zephyrproject-rtos#12: 192 bytes (9386 bps) Write Complete (err 0) Write zephyrproject-rtos#13: 208 bytes (8533 bps) Write zephyrproject-rtos#14: 224 bytes (9244 bps) Write zephyrproject-rtos#15: 240 bytes (9955 bps) Write zephyrproject-rtos#16: 256 bytes (8000 bps) Signed-off-by: Luiz Augusto von Dentz <[email protected]>
This makes the gatt metrics also available for gatt write-without-rsp-cb so it now prints the rate of each write: uart:~$ gatt write-without-response-cb 1e ff 10 10 Write zephyrproject-rtos#1: 16 bytes (0 bps) Write zephyrproject-rtos#2: 32 bytes (3445948416 bps) Write zephyrproject-rtos#3: 48 bytes (2596929536 bps) Write zephyrproject-rtos#4: 64 bytes (6400 bps) Write zephyrproject-rtos#5: 80 bytes (8533 bps) Write zephyrproject-rtos#6: 96 bytes (10666 bps) Write zephyrproject-rtos#7: 112 bytes (8533 bps) Write zephyrproject-rtos#8: 128 bytes (9955 bps) Write zephyrproject-rtos#9: 144 bytes (11377 bps) Write zephyrproject-rtos#10: 160 bytes (7680 bps) Write zephyrproject-rtos#11: 176 bytes (8533 bps) Write zephyrproject-rtos#12: 192 bytes (9386 bps) Write Complete (err 0) Write zephyrproject-rtos#13: 208 bytes (8533 bps) Write zephyrproject-rtos#14: 224 bytes (9244 bps) Write zephyrproject-rtos#15: 240 bytes (9955 bps) Write zephyrproject-rtos#16: 256 bytes (8000 bps) Signed-off-by: Luiz Augusto von Dentz <[email protected]>
This makes the gatt metrics also available for gatt write-without-rsp-cb so it now prints the rate of each write: uart:~$ gatt write-without-response-cb 1e ff 10 10 Write zephyrproject-rtos#1: 16 bytes (0 bps) Write zephyrproject-rtos#2: 32 bytes (3445948416 bps) Write zephyrproject-rtos#3: 48 bytes (2596929536 bps) Write zephyrproject-rtos#4: 64 bytes (6400 bps) Write zephyrproject-rtos#5: 80 bytes (8533 bps) Write zephyrproject-rtos#6: 96 bytes (10666 bps) Write zephyrproject-rtos#7: 112 bytes (8533 bps) Write zephyrproject-rtos#8: 128 bytes (9955 bps) Write zephyrproject-rtos#9: 144 bytes (11377 bps) Write zephyrproject-rtos#10: 160 bytes (7680 bps) Write zephyrproject-rtos#11: 176 bytes (8533 bps) Write zephyrproject-rtos#12: 192 bytes (9386 bps) Write Complete (err 0) Write zephyrproject-rtos#13: 208 bytes (8533 bps) Write zephyrproject-rtos#14: 224 bytes (9244 bps) Write zephyrproject-rtos#15: 240 bytes (9955 bps) Write zephyrproject-rtos#16: 256 bytes (8000 bps) Signed-off-by: Luiz Augusto von Dentz <[email protected]>
This makes the gatt metrics also available for gatt write-without-rsp-cb so it now prints the rate of each write: uart:~$ gatt write-without-response-cb 1e ff 10 10 Write #1: 16 bytes (0 bps) Write #2: 32 bytes (3445948416 bps) Write #3: 48 bytes (2596929536 bps) Write #4: 64 bytes (6400 bps) Write #5: 80 bytes (8533 bps) Write #6: 96 bytes (10666 bps) Write #7: 112 bytes (8533 bps) Write #8: 128 bytes (9955 bps) Write #9: 144 bytes (11377 bps) Write #10: 160 bytes (7680 bps) Write #11: 176 bytes (8533 bps) Write #12: 192 bytes (9386 bps) Write Complete (err 0) Write #13: 208 bytes (8533 bps) Write #14: 224 bytes (9244 bps) Write #15: 240 bytes (9955 bps) Write #16: 256 bytes (8000 bps) Signed-off-by: Luiz Augusto von Dentz <[email protected]>
This makes the gatt metrics also available for gatt write-without-rsp-cb so it now prints the rate of each write: uart:~$ gatt write-without-response-cb 1e ff 10 10 Write zephyrproject-rtos#1: 16 bytes (0 bps) Write zephyrproject-rtos#2: 32 bytes (3445948416 bps) Write zephyrproject-rtos#3: 48 bytes (2596929536 bps) Write zephyrproject-rtos#4: 64 bytes (6400 bps) Write zephyrproject-rtos#5: 80 bytes (8533 bps) Write zephyrproject-rtos#6: 96 bytes (10666 bps) Write zephyrproject-rtos#7: 112 bytes (8533 bps) Write zephyrproject-rtos#8: 128 bytes (9955 bps) Write zephyrproject-rtos#9: 144 bytes (11377 bps) Write zephyrproject-rtos#10: 160 bytes (7680 bps) Write zephyrproject-rtos#11: 176 bytes (8533 bps) Write zephyrproject-rtos#12: 192 bytes (9386 bps) Write Complete (err 0) Write zephyrproject-rtos#13: 208 bytes (8533 bps) Write zephyrproject-rtos#14: 224 bytes (9244 bps) Write zephyrproject-rtos#15: 240 bytes (9955 bps) Write zephyrproject-rtos#16: 256 bytes (8000 bps) Signed-off-by: Luiz Augusto von Dentz <[email protected]>
This makes the gatt metrics also available for gatt write-without-rsp-cb so it now prints the rate of each write: uart:~$ gatt write-without-response-cb 1e ff 10 10 Write #1: 16 bytes (0 bps) Write #2: 32 bytes (3445948416 bps) Write #3: 48 bytes (2596929536 bps) Write #4: 64 bytes (6400 bps) Write #5: 80 bytes (8533 bps) Write #6: 96 bytes (10666 bps) Write #7: 112 bytes (8533 bps) Write #8: 128 bytes (9955 bps) Write #9: 144 bytes (11377 bps) Write #10: 160 bytes (7680 bps) Write #11: 176 bytes (8533 bps) Write #12: 192 bytes (9386 bps) Write Complete (err 0) Write #13: 208 bytes (8533 bps) Write #14: 224 bytes (9244 bps) Write #15: 240 bytes (9955 bps) Write #16: 256 bytes (8000 bps) Signed-off-by: Luiz Augusto von Dentz <[email protected]>
[BUG zephyrproject-rtos#2882] arch: arm64: core: Add IPI for system halt
…r zephyrproject-rtos/lvgl
- Minor cleanup, tweaks to tag_main.sh. - Added the pr_comment.sh script * writes a comment to a PR with the rebase tag info * Works for both zephyr and zephyr-intel manifest update PRs Signed-off-by: Connor Graydon <[email protected]>
…rproject-rtos#15) Do not re-init PLLs after already being initialized Approved-by: Fabian van den IJssel Approved-by: Chris Desjardins
Collection of commit to refactor ll.c file.
This change is